home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Your Choice 3
/
Your Choice Software Collection 3.iso
/
os2
/
fm2_207
/
cvt4os2.cmd
< prev
next >
Wrap
OS/2 REXX Batch file
|
1994-08-18
|
2KB
|
46 lines
/* Convert DESCRIPT.ION files to WPS .SUBJECT EAs */
/* I'm not terribly familiar with 4OS2 so this might */
/* not cover unusual situations (for instance, I'm */
/* guessing the format is "filename.ext description" */
/* and don't try to handle filenames with embedded */
/* spaces since I don't know how they're handled in */
/* the file (quote delimited?). Modify to taste. */
/* As written, DESCRIPT.ION file must be in the */
/* default directory. Also note that I'm told that */
/* 4OS2 has commands that allow it to retrieve the */
/* file description for you -- it might be best to */
/* use those instead of reading the DESCRIPT.ION */
/* file directly. */
'@echo off'
call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
call SysLoadFuncs
rc = SysFileTree('DESCRIPT.ION','dummy','F','*****','**---')
describename = stream('DESCRIPT.ION','C','query exists')
if describename \= '' then
do
destream = stream(describename,'C','open')
if destream = "READY:" then
do
say 'Working...'
do while lines(describename)
text = linein(describename)
parse var text filename text
text = left(text,40)
text = strip(text)
filename = strip(filename)
if filename \= '' then
if text \= '' then
do
description = 'FDFF'x || d2c(length(text)) || '00'x || text
call SysPutEA filename,'.SUBJECT',description
end
end
call stream describename,'C','close'
'del 'describename
end
end
else
say 'File DESCRIPT.ION not found in current directory.'
exit